
<!-- saved from url=(0050)http://uva.onlinejudge.org/external/113/11384.html -->
<HTML><HEAD><META http-equiv="Content-Type" content="text/html; charset=windows-1252">

<META name="Generator" content="Microsoft Word 12 (filtered)">
<STYLE>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin-top:0in;
	margin-right:0in;
	margin-bottom:10.0pt;
	margin-left:0in;
	line-height:115%;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-link:"Balloon Text Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:8.0pt;
	font-family:"Tahoma","sans-serif";}
span.MsoPlaceholderText
	{color:gray;}
span.BalloonTextChar
	{mso-style-name:"Balloon Text Char";
	mso-style-link:"Balloon Text";
	font-family:"Tahoma","sans-serif";}
.MsoPapDefault
	{margin-bottom:10.0pt;
	line-height:115%;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
	{page:Section1;}
-->
</STYLE>

</HEAD><BODY lang="EN-US">

<DIV class="Section1">

<P class="MsoNormal" align="center" style="margin-bottom:0in;margin-bottom:.0001pt;
text-align:center"><B><SPAN style="font-size:22.0pt;line-height:115%;
font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">Problem H</SPAN></B></P>

<P class="MsoNormal" align="center" style="margin-bottom:0in;margin-bottom:.0001pt;
text-align:center"><B><SPAN style="font-size:20.0pt;line-height:115%;
font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">Help is needed for Dexter</SPAN></B></P>

<P class="MsoNormal" align="center" style="margin-top:3.0pt;margin-right:0in;
margin-bottom:0in;margin-left:0in;margin-bottom:.0001pt;text-align:center"><SPAN style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">Time Limit: 3 Second</SPAN></P>

<P class="MsoNormal" align="center" style="margin-bottom:0in;margin-bottom:.0001pt;
text-align:center"><SPAN style="font-size:10.0pt;line-height:115%;font-family:
&quot;Times New Roman&quot;,&quot;serif&quot;">&nbsp;</SPAN></P>

<P class="MsoNormal" style="margin-bottom:6.0pt;text-align:justify"><SPAN style="font-size:12.0pt;line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">Dexter
is tired of Dee Dee. So he decided to keep Dee Dee busy in a game. The game he
planned for her is quite easy to play but not easy to win at least not for Dee
Dee. But Dexter does not have time to spend on this silly task, so he wants
your help.</SPAN><SPAN style="font-size:12.0pt;line-height:115%"> </SPAN></P>

<P class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;text-align:
justify"><SPAN style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">&nbsp;</SPAN></P>

<P class="MsoNormal" style="margin-bottom:6.0pt;text-align:justify"><SPAN style="font-size:12.0pt;line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">There
will be a button, when it will be pushed a random number N will be chosen by
computer. Then on screen there will be numbers from 1 to N. Dee Dee can choose
any number of numbers from the numbers on the screen, and then she will command
computer to subtract a positive number chosen by her (not necessarily on
screen) from the selected numbers. Her objective will be to make all the
numbers 0.</SPAN></P>

<P class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;text-align:
justify"><SPAN style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">&nbsp;</SPAN></P>

<P class="MsoNormal" style="margin-bottom:6.0pt;text-align:justify"><SPAN style="font-size:12.0pt;line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">For
example if N = 3, then on screen there will be 3 numbers on screen: 1, 2, 3.
Say she now selects 1 and 2. Commands to subtract 1, then the numbers on the
screen will be: 0, 1, 3. Then she selects 1 and 3 and commands to subtract 1.
Now the numbers are 0, 0, 2. Now she subtracts 2 from 2 and all the numbers
become 0.</SPAN></P>

<P class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;text-align:
justify"><SPAN style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">&nbsp;</SPAN></P>

<P class="MsoNormal" style="margin-bottom:6.0pt;text-align:justify"><SPAN style="font-size:12.0pt;line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">Dexter
is not so dumb to understand that this can be done very easily, so to make a
twist he will give a limit L for each N and surely L will be as minimum as
possible so that it is still possible to win within L moves. But Dexter does
not have time to think how to determine L for each N, so he asks you to write a
code which will take N as input and give L as output.</SPAN></P>

<P class="MsoNormal" style="margin-bottom:6.0pt"><SPAN style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">&nbsp;</SPAN></P>

<P class="MsoNormal" style="margin-bottom:6.0pt"><B><U><SPAN style="font-size:
14.0pt;line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">Input and Output:</SPAN></U></B></P>

<P class="MsoNormal" style="margin-bottom:6.0pt"><SPAN style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">Input
consists of several lines each with N such that </SPAN><SPAN style="font-family:
&quot;Times New Roman&quot;,&quot;serif&quot;">1 </SPAN><SPAN style="font-size:12.0pt;line-height:
115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">&#8804; N &#8804; 1,000,000,000</SPAN><SPAN style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">. Input will be terminated by end
of file. For each N output L in separate lines.</SPAN></P>

<P class="MsoNormal" style="margin-bottom:6.0pt"><SPAN style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">&nbsp;</SPAN></P>

<TABLE class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0" style="border-collapse:collapse;border:none">
 <TBODY><TR>
  <TD width="319" valign="top" style="width:239.4pt;border:none;padding:0in 5.4pt 0in 5.4pt">
  <P class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal"><B><SPAN style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">SAMPLE
  INPUT</SPAN></B></P>
  </TD>
  <TD width="319" valign="top" style="width:239.4pt;border:none;padding:0in 5.4pt 0in 5.4pt">
  <P class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal"><B><SPAN style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">OUTPUT
  FOR SAMPLE INPUT</SPAN></B></P>
  </TD>
 </TR>
 <TR>
  <TD width="319" valign="top" style="width:239.4pt;border:solid black 1.0pt;
  border-top:none;background:#BFBFBF;padding:0in 5.4pt 0in 5.4pt">
  <P class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal"><SPAN style="font-family:&quot;Courier New&quot;">1</SPAN></P>
  <P class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal"><SPAN style="font-family:&quot;Courier New&quot;">2</SPAN></P>
  <P class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal"><SPAN style="font-family:&quot;Courier New&quot;">3</SPAN></P>
  </TD>
  <TD width="319" valign="top" style="width:239.4pt;border-top:none;border-left:
  none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt;
  background:#BFBFBF;padding:0in 5.4pt 0in 5.4pt">
  <P class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal"><SPAN style="font-family:&quot;Courier New&quot;">1</SPAN></P>
  <P class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal"><SPAN style="font-family:&quot;Courier New&quot;">2</SPAN></P>
  <P class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
  normal"><SPAN style="font-family:&quot;Courier New&quot;">2</SPAN></P>
  </TD>
 </TR>
</TBODY></TABLE>

<P class="MsoNormal"><SPAN style="font-size:8.0pt;line-height:115%;font-family:
&quot;Times New Roman&quot;,&quot;serif&quot;">&nbsp;</SPAN></P>

<P class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt"><B><SPAN style="font-size:12.0pt;line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">Problemsetter:</SPAN></B><SPAN style="font-size:12.0pt;line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">
Md. Mahbubul Hasan</SPAN></P>

</DIV>




</BODY></HTML>